DestroyCollider={};
local this = DestroyCollider;
local gameObject;
local transform;
function DestroyCollider.New()
    gameObject=GameObject.Find("DestroyCollider");
    transform=gameObject.transform;   

    local LuaTrigger = gameObject:AddComponent(typeof(LuaTrigger2D));
    LuaTrigger:SetExitFunc(this.OnTriggerExit,nil);
end
function DestroyCollider.OnTriggerExit(collision )
    if (collision:CompareTag("PlayerBullet")) then
        poolMgr:Release("PlayerBullet",collision.gameObject);  
    elseif (collision:CompareTag("EnemyBullet")) then
        poolMgr:Release("EnemyBullet",collision.gameObject);
    end
end
